diff options
Diffstat (limited to 'src/pages/blog/[...slug].astro')
| -rw-r--r-- | src/pages/blog/[...slug].astro | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/pages/blog/[...slug].astro b/src/pages/blog/[...slug].astro deleted file mode 100644 index 800c534..0000000 --- a/src/pages/blog/[...slug].astro +++ /dev/null @@ -1,20 +0,0 @@ ---- -import { type CollectionEntry, getCollection } from 'astro:content'; -import BlogPost from '../../layouts/BlogPost.astro'; - -export async function getStaticPaths() { - const posts = await getCollection('blog'); - return posts.map((post) => ({ - params: { slug: post.slug }, - props: post, - })); -} -type Props = CollectionEntry<'blog'>; - -const post = Astro.props; -const { Content } = await post.render(); ---- - -<BlogPost {...post.data}> - <Content /> -</BlogPost>
\ No newline at end of file |
